<?php
class BookModel extends Eloquent {
    protected $table = 'book';
    protected $hidden = array('cover_front');
    protected $appends = array('cover_front_url');
    public function getCoverFrontUrlAttribute($value){
        $value = $this->cover_front;
        if(empty($value)) return '';
        $baseUrl = '';
        return $baseUrl.$value;
    }
}


